import {
    request
} from './request'

export function homeList() {
    return request({
        url: '/menus'
    })
}

export function homeUser(params) {
    return request({
        url: '/users',
        params
    })
}

export function userChange(url) {
    return request({
        url,
        method: 'put'
    })
}

export function addUser(data) {
    return request({
        url : '/users',
        data,
        method : 'post'
    })
}

export function getUserData(url){
    return request({
        url,
        method : "get"
    })
}

export function putAlterUser(url,data){
    return request({
        url,
        method : "put",
        data
    })
}

export function deleteUser(url){
    return request({
        url ,
        method : "delete"
    })
}

export function setData(url,data){
    return request({
        url,
        method : 'post',
        data
    })
}

export function setRoles(url,data){
    return request({
        url,
        data,
        method : 'put'
    })
}